<?php
$id=$_GET['ntvid'];
$mnguoitimviec=new Model_Nguoitimviec;
if(isset($_POST['ok'])){
	if($_POST['txtbc'] == NULL){
		$data['error'][]=ERROR_NGUOITIMVIEC_EMPTY;
	}else{
		$bc=$_POST['txtbc'];
	}
	if($bc){
		$data=array(
			"ten_bc" => $bc
		);
		
		if($mnguoitimviec->update_nguoitimviec($data,$id) == TRUE){
			redirect("index.php?module=nguoitimviec&act=list");
		}else{
			$data['error'][]=ERROR_NGUOITIMVIEC_CREATE;
		}
	}
}
$data['info']=$mnguoitimviec->getnguoitimviec($id);
loadview("nguoitimviec/edit_view",$data);

?>